<?php echo $this->fetch('header_zeepin.html'); ?>
<script type="text/javascript">
//注册表单验证
$(function(){
    $('#register_form').validate({
    	
        errorPlacement: function(error, element){
            var error_td = element.parent('div').next('div');
            error_td.find('.field_notice').hide();
            error_td.append(error);
            element.parent('div').addClass("minbox_hd_error").removeClass("minbox_hd");
        },
        success : function(label){
            label.addClass('validate_right').text('OK!');
            label.parent('div').prev('div').addClass("minbox_hd").removeClass("minbox_hd_error");
            if(label.attr("for")=="password_confirm"&&label.html()=="OK!"){
            	var submit_button = "<input type='image' src='<?php echo $this->res_base . "/" . 'images'; ?>/finish_ov.gif' />";
            	$("#register_right").children(".right_bg").html(submit_button);
            }
        },
        onkeyup: false,
        rules : {
            user_name : {
                required : true,
                byteRange: [3,15,'<?php echo $this->_var['charset']; ?>'],
                remote   : {
                    url :'index.php?app=member&act=check_user&ajax=1',
                    type:'get',
                    data:{
                        user_name : function(){
                            return $('#user_name').val();
                        }
                    },
                    beforeSend:function(){
                        var _checking = $('#checking_user');
                        _checking.prev('.field_notice').hide();
                        _checking.next('label').hide();
                        $(_checking).show();
                    },
                    complete :function(){
                        $('#checking_user').hide();
                    }
                }
            },
            password : {
                required : true,
                minlength: 6
            },
            password_confirm : {
                required : true,
                equalTo  : '#password'
            },
            email : {
                required : true,
                email    : true
            },
            captcha : {
                required : true,
                remote   : {
                    url : 'index.php?app=captcha&act=check_captcha',
                    type: 'get',
                    data:{
                        captcha : function(){
                            return $('#captcha1').val();
                        }
                    }
                }
            },
            agree : {
                required : true
            }
        },
        messages : {
            user_name : {
                required : '您必须提供一个用户名',
                byteRange: '用户名必须在3-15个字符之间',
                remote   : '您提供的用户名已存在'
            },
            password  : {
                required : '您必须提供一个密码',
                minlength: '密码长度应在6-20个字符之间'
            },
            password_confirm : {
                required : '您必须再次确认您的密码',
                equalTo  : '两次输入的密码不一致'
            },
            email : {
                required : '您必须提供您的电子邮箱',
                email    : '这不是一个有效的电子邮箱'
            },
            captcha : {
                required : '请输入右侧图片中的文字',
                remote   : '验证码错误'
            },
            agree : {
                required : '您必须阅读并同意该协议,否则无法注册'
            }
        },
    });
});
</script>
<div class="container">
  <div class="span12 register">
  <form name="" id="register_form" method="post" action="">
      <div class="left space">
      
           <div class="span3 minbox">
                    <div class="minbox_hd">用户名:
                      <input type="text" id="user_name" name="user_name" />
                    </div>  
                    <div class="minbox_bd"><label class="field_notice">注册后不可更改</label><label id="checking_user" class="checking">检查中...</label>
                    </div>
           </div>   
            
              <div class="span3 minbox">
                    <div class="minbox_hd"><a href="#" class="question"></a>邮箱:
                      <input type="text" name="email" />
                    </div> 
                     <div class="minbox_bd"><label class="field_notice">注册后不可更改</label>
                     </div> 
              </div> 
       </div>   
       
        
        <div class="left space">
             <div class="span3 minbox ">
                    <div class="minbox_hd">密&nbsp;&nbsp;&nbsp;码:
                      <input type="password" id="password" name="password"  />
                    </div>   
                     <div class="minbox_bd"><label class="field_notice">字母数字组合</label>
                    </div>
              </div>    
              
              
              <div class="span3 minbox">
                    <div class="minbox_hd_error"><a href="#" class="question"></a>确认密码:
                    <input type="password" name="password_confirm" />
                    </div>
                    
                    <div class="minbox_bd orange"><label class="field_notice">重复输入您的密码</label>
                    </div>
              </div> 
             
     
        </div>   
           <div class="right"  id="register_right">
             <div class="right_bg">
               <input type="image" disabled="true" src="<?php echo $this->res_base . "/" . 'images'; ?>/finish_bf.gif" />
             </div>
         </div>
</form>   
   
   
    <div class="span4 ">
         
        </div> 
</div>
    
<div class="nav">
   <div class="login">注册
    </div>
 </div>
   
<div class="content">
11111
</div>
</div>
</body>
</html>
